﻿using BCEntity.TMS.SystemProtocolConfig;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCData.TMS.SystemProtocolConfig
{
    public interface ISystemProtocolConfigData
    {
        /// <summary>
        /// 删除系统协议配置记录
        /// </summary>
        /// <param name="systemProtocolConfigKey"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(string systemProtocolConfigKey);

        /// <summary>
        /// 获取系统协议配置记录
        /// </summary>
        /// <param name="systemProtocolConfigKey"></param>
        /// <returns></returns>
        Task<SystemProtocolConfigEntity> GetEntityAsync(string systemProtocolConfigKey);

        /// <summary>
        /// 查询系统协议配置记录 分页
        /// </summary>
        /// <param name="protocolTitle"></param>
        /// <param name="protocolContent"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(IEnumerable<SystemProtocolConfigEntity>, int)> GetListAsync(string protocolTitle, string protocolContent, int pageIndex, int pageSize);

        /// <summary>
        /// 添加新系统协议配置纪录
        /// </summary>
        /// <param name="systemProtocolConfigEntity"></param>
        /// <returns></returns>
        Task<SystemProtocolConfigEntity> InsertAsync(SystemProtocolConfigEntity entity);

        /// <summary>
        /// 修改系统协议配置记录
        /// </summary>
        /// <param name="systemProtocolConfigEntity"></param>
        /// <returns></returns>
        Task<SystemProtocolConfigEntity> UpdateAsync(SystemProtocolConfigEntity entity);
    }
}